﻿using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Web;
using Acaweb.Model.Entities;

namespace Acaweb.Servicios.Contracts
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IDepartamentosService" in both code and config file together.
    [ServiceContract]
    public interface IDepartamentosService
    {
        /// <summary>
        /// Provee todos los Departamentos o Estados registrados
        /// </summary>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetAll", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        List<Departamentos> GetAll();

        /// <summary>
        /// Retorna la información de un solo Departamento o Estado
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetById", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        Departamentos GetById(int Id);

        /// <summary>
        /// Provee todos los estados o departamentos de un Pais
        /// </summary>
        /// <param name="Codigo"></param>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetByPais", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        List<Departamentos> GetByPais(int Codigo);

        /// <summary>
        /// Provee todos los estados o departamentos de un Pais
        /// </summary>
        /// <param name="Codigo"></param>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetByNombrePais", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        List<Departamentos> GetByNombrePais(string NombrePais);
    }
}
